
<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content">
  <div class="top">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
      <h1><?php echo $heading_title; ?></h1>
    </div>
  </div>
  <div class="middle">
  
    <?php if ($description) { ?>
		<div class="category-vertical-info">
		 <?php if ($thumb) { ?>
		 <div class="category-image-vertical-info">
		 <img src=" <?php echo $thumb; ?>" title="kategoria" alt="kategoria"/>
		 </div>
		 <?php } ?>
		
		<?php echo $description; ?></div>
	<?php } ?>
	<?php if (!$categories && !$products) { ?>
    <div class="content"><?php echo $text_error; ?></div>
    <?php } ?>
    <?php if ($categories) { ?>
    <table class="list">
      <?php for ($i = 0; $i < sizeof($categories); $i = $i + 4) { ?>
      <tr>
        <?php for ($j = $i; $j < ($i + 4); $j++) { ?>
        <td width="25%"><?php if (isset($categories[$j])) { ?>
          <a href="<?php echo $categories[$j]['href']; ?>"><img src="<?php echo $categories[$j]['thumb']; ?>" title="<?php echo $categories[$j]['name']; ?>" alt="<?php echo $categories[$j]['name']; ?>" style="margin-bottom: 3px;" /></a><br />
          <a href="<?php echo $categories[$j]['href']; ?>" class="category-name"><?php echo $categories[$j]['name']; ?></a>
          <?php } ?></td>
        <?php } ?>
      </tr>
      <?php } ?>
    </table>
    <?php } ?>
    <?php if ($products) { ?>
    <div class="sort">
      <div class="div1">
        <select name="sort" onchange="location = this.value">
          <?php foreach ($sorts as $sorts) { ?>
          <?php if (($sort . '-' . $order) == $sorts['value']) { ?>
          <option value="<?php echo $sorts['href']; ?>" selected="selected"><?php echo $sorts['text']; ?></option>
          <?php } else { ?>
          <option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option>
          <?php } ?>
          <?php } ?>
        </select>
      </div>
      <div class="div2"><?php echo $text_sort; ?></div>
    </div>
    <div class="list">
      <?php for ($j = 0; $j < sizeof($products); $j = $j + 1) { ?>
      
      <?php if (isset($products[$j])) { ?>
      <div class="product-vertical-info">
      	 <div class="product-image-vertical-info">
      	 	<a href="<?php echo $products[$j]['href']; ?>"><img src="<?php echo $products[$j]['thumb']; ?>" title="<?php echo $products[$j]['name']; ?>" alt="<?php echo $products[$j]['name']; ?>" /></a>
      	 </div>
      	 <div class="product-details-vertical-info">
      	 	<div class="product-title-vertical-info">
      	 		<a href="<?php echo $products[$j]['href']; ?>"><?php echo $products[$j]['name']; ?></a>
      	 	</div>
      	 	<div class="product-description-vertical-info">
      	 		<a href="<?php echo $products[$j]['href']; ?>"><?php echo $products[$j]['description']; ?></a>
      	 	</div>
      	 	<div class="product-bottom-vertical-info">
      	 		<div class="product-prices-vertical-info">
      	 			  <?php if ($display_price) { ?>
				          <?php if (!$products[$j]['special']) { ?>
				          Cena:&nbsp;<span style="color: #900; font-weight: bold;font-size: 1.3em"><?php echo $products[$j]['net_price']; ?></span>&nbsp;&nbsp;(brutto&nbsp;<?php echo $products[$j]['price']; ?>)
				          <?php } else { ?>
				          Cena:&nbsp;<span style="color: #900; text-decoration: line-through;"><?php echo $products[$j]['net_price']; ?></span>&nbsp;<span style="color: #F00;font-weight: bold; font-size: 1.3em"><?php echo $products[$j]['net_special']; ?></span>&nbsp;&nbsp;(brutto&nbsp;<?php echo $products[$j]['special']; ?>)
				          <?php } ?>
					  <?php } ?>
  
      	 		</div>
      	 		<div class="product-see-vertical-info">
      	 			<a class="button" href="<?php echo $products[$j]['href']; ?>"><span>Szczegóły</span></a>
      	 			<?php if ($display_price) { ?>
      	 				<a class="button" href="<?php echo $products[$j]['add']; ?>" title="<?php echo $button_add_to_cart; ?>" ><span><?php echo $button_add_to_cart; ?></span></a>
      	 			<?php } ?>
      	 		</div>
      	 	</div>
      	 </div>
      </div>
       <?php } ?>
      <?php } ?>
    </div>
    <div class="pagination"><?php echo $pagination; ?></div>
    <?php } ?>
  </div>
  <div class="bottom">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>
</div>
<?php echo $footer; ?> 
